/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-item {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
    font-size: 14px;
    text-align: center;
}

.nav-item:hover {
    background-color: #0056b3;
}

/* 表格样式 */
.section {
    margin-top: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* 提升移动端滚动体验 */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 按钮样式 */
.action-btn {
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    margin: 2px;
    display: inline-block;
    font-size: 12px;
}

.edit-btn {
    background-color: #28a745;
}

.delete-btn {
    background-color: #dc3545;
}

.add-btn {
    background-color: #007bff;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 20px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.stat-card {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* 页面标题 */
.page-title {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .action-btn {
        padding: 6px 12px;
        margin: 2px 0;
    }
    
    td .action-btn {
        display: block;
        text-align: center;
        margin: 4px 0;
    }
    
    .modal-content {
        margin: 10px;
        width: auto;
    }
    
    .form-group label {
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 10px;
    }
}

/* 闪现消息样式 */
.flash-messages {
    margin: 10px 0;
}

.flash-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 状态标签样式 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-待维修 {
    background-color: #ffc107;
    color: #000;
}

.status-维修中 {
    background-color: #17a2b8;
    color: #fff;
}

.status-已完成 {
    background-color: #28a745;
    color: #fff;
}

.status-已取消 {
    background-color: #dc3545;
    color: #fff;
}

/* 看板样式 */
.section-title {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.stats-grid .stat-card {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid .stat-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.stat-card-link:hover {
    transform: translateY(-5px);
}

.filter-info {
    margin: 20px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-info p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    margin-left: 10px;
}

/* 让状态卡片可点击的样式 */
.stats-grid .stat-card {
    cursor: pointer;
}

.stats-grid .stat-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 5px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: #f8f9fa;
}

.page-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.page-dots {
    padding: 8px 12px;
    color: #666;
}

/* 添加响应式支持 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
} 